cmake_minimum_required(VERSION 3.10.2)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

project(fc_srv)

#add_library(fc_srv
#  ../broker/broker.h
#  ../common_data/common_data.h
#)
file(GLOB SRCFILES *.cxx)

add_executable(fc_srv
  ../../modules/broker/broker.c
  ../../modules/common_data/common_data.c
  ../../modules/fc_srv/fc_srv.cpp
  ../../unit_tests/fc_srv/fc_main.cpp
)

target_include_directories(fc_srv PRIVATE ../../modules/broker ../../modules/common_data ../../modules/fc_srv)

find_package(MAVSDK REQUIRED ev)

target_link_libraries(fc_srv
    MAVSDK::mavsdk
    ev
)

if(NOT MSVC)
    add_compile_options(fc_srv PRIVATE -Wall -Wextra)
else()
    add_compile_options(fc_srv PRIVATE -WX -W2)
endif()
